<?php
$this->pageTitle=Yii::app()->name . ' - Contact Us';
?>
<div class="padding-1">
    <div class="container_24">
        <article class="grid_9">
            <div class="padding-top">
                <div class="box-1 title2">
                    <div class="box-padding9">
                        <h1>Find Us</h1>
                        <div class="rel indent-bot1">
                            <div class="map">
                                <iframe src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Brooklyn,+New+York,+NY,+United+States&amp;aq=0&amp;sll=37.0625,-95.677068&amp;sspn=61.282355,146.513672&amp;ie=UTF8&amp;hq=&amp;hnear=Brooklyn,+Kings,+New+York&amp;ll=40.649974,-73.950005&amp;spn=0.01628,0.025663&amp;z=14&amp;iwloc=A&amp;output=embed"></iframe>
                             </div>
                             <span class="img-shadow-middle"></span>
                         </div>
                         <div class="z5">
                             <p class="p0">
                                <strong class="color-3">Donec eget tellus non erat lacinia fermentum.<br> Donec in velit vel ipsum auctor pulvinar.</strong>
                             </p>
                             Praesent vestibulum molestie lacus. Aenean non <br>ummy hendrerit mauris. Phasellus porta. Fusce<br> suscipit varius mi. Cum sociis natoque penatibus<br> et magnis dis parturient monte.
                         </div>
                    </div>
                </div>                        
            </div>
        </article>
        <article class="grid_15">
             <h2 class="border-bot title">Get <span>In Touch</span></h2>
             <div class="padding-left2">
              <?php if(Yii::app()->user->hasFlash('success')){ ?>
                <div class="success"><?php echo Yii::app()->user->getFlash('success'); ?></div>
              <?php } else { ?>
              <?php $form=$this->beginWidget('CActiveForm', array(
                'id'=>'contact-form',
                'enableClientValidation'=>true,
                'clientOptions'=>array(
                  'validateOnSubmit'=>true,
                ),
              )); ?>                
                <fieldset>
                  <div class="field">
                      <label class="name">
                        <span class="bg-form">
                          <span class="text-form5">Name</span>
                          <?php echo $form->textField($model,'name'); ?>
                        </span>
                        <?php echo $form->error($model,'name'); ?>
                      </label>
                  </div>
                  <div class="field">
                      <label class="email">
                        <span class="bg-form">
                          <span class="text-form5">Email</span>
                          <?php echo $form->textField($model,'email'); ?>
                        </span>
                        <?php echo $form->error($model,'email'); ?>
                      </label>
                  </div>
                  <div class="area">
                      <label class="message">
                        <span class="bg-form1">
                          <span class="text-form5">Message</span>
                          <?php echo $form->textArea($model,'message',array('rows'=>6, 'cols'=>50)); ?>
                        </span>
                        <?php echo $form->error($model,'message'); ?>
                      </label>
                  </div>
                  <div class="clear"></div>
                  <div class="buttons-wrapper">
                    <a class="button-1" data-type="reset" onclick="formReset();"><span class="txt">Clear</span></a>
                    <a class="button-1" data-type="submit" onclick="formSubmit();"><span class="txt">Send message</span></a>
                  </div>
                </fieldset>
              <?php $this->endWidget(); ?>
            <?php } ?>
            </div>              
        </article>
        <div class="clear"></div>
    </div>
</div>
<script>
function formReset()
{
document.getElementById('contact-form').reset();
}
function formSubmit()
{
  document.getElementById('contact-form').submit();
}
</script>